package com.app.partner.mapper;

import com.app.partner.model.User;
import com.app.partner.model.pinglun;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import javax.xml.crypto.Data;
import java.util.List;

@Repository
@Mapper
public interface pinglunMapper {
    @Select("select plentername,plcontent,local_time from part_pinglun")
    List<pinglun> findAll() throws Exception;

    @Insert("insert into part_pinglun(plid,plentername,plcontent,local_time) value(null,#{entername},#{pinglun},#{nowTime})")
    void save(@Param("entername") String plentername, @Param("pinglun") String plcontent, @Param("nowTime") String nowTime);
}
